let Mock = require("mockjs")

module.exports = {
    //仓库管理页
    warehouseManagment(req) {
        //接受用户的id  eg: req.userId 
        // console.log('req', req)
        let data = [];
        let deptNames = Mock.mock('@cword(3)');
        for(let i = 0; i < 7; i++) {
            let pu = {
                warehouseNo: Mock.mock('@natural(2001, 2999)'),//序号号
                warehouseProName: Mock.mock('@cword(3, 5)'), //商品名称
                warehouseNumber: Mock.mock('@natural(50, 200)'),   //商品数量
                warehouseNumberMin: 50,    //最低库存
                warehouseNumberMax: 200,  //最高库存
                // deptName: Mock.mock('@cword(3)'),
                // deptNo: Mock.mock('@natural(2001, 2999)'),
                // editTime: Mock.mock('@datetime()'),
                // editUser: Mock.mock('@cname')
            }
            data.push(pu);
        }
        return {
            code: 200,
            message: "成功",
            data: data 
        }
    }
}